In the cloud computing field, user data stored at a cloud end (a cloud server) is called cloud data. A user loses direct control of data when storing the data at the cloud end and data security cannot be ensured. An important measure to protect data security is to encrypt the data.
In the prior art, terminal A encrypts data and uploads the encrypted data to a cloud server. Another terminal, such as terminal B, requests a key from terminal A after loading the encrypted data from the cloud server and after obtaining the key, uses the key to decrypt the encrypted data.
By analyzing the prior art, the inventor finds the prior art has at least the following problem:
In the prior art, another terminal, such as terminal B, may request obtaining of a key that terminal A encrypts data. When this method is used, if the key is not properly protected, it is possible that key leakage occurs, so that data sharing is not secure.